package com.hejjon.core.domain.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * @author: cs
 * @date: 2025-05-15 12:33:53
 * @since: 1.0
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("feature_field")
@ApiModel(value="FeatureField对象", description="特征字段表")
public class FeatureField {

    @TableId("id")
    private String id;

    @TableField("name")
    private String name;

    @TableField("label")
    private String label;

    @TableField("is_ref")
    private Integer isRef;      // 是否为引用类型  是否是引用类型 1是0否

    @TableField("feature_id")
    private String featureId;

    /**
     * 字段种类：三种取值
     *  业务对象 feature   typeId 对应 business_feature 表主键
     *  业务属性 busiAttr  typeId 对应 business_attr 表主键
     *  基本类型 basicType
     */
    @TableField("kind")
    private String kind;

    /**
     * 类型ID
     */
    @TableField("type_id")
    private String typeId;

    /**
     * 业务属性ID
     */
    @TableField("busi_attr_id")
    private String busiAttrId;

    /**
     * jdbc类型，数据库中存的类型
     * 取值为 com.hejjon.core.enumer.JdbcTypeEnum 枚举类
     * 具体值需要根据类型 type字段推断
     */
    @TableField("jdbc_type")
    private String jdbcType;

    @TableField("default_value")
    private String defaultValue;

    @TableField("description")
    private String description;

    @TableField("create_time")
    private LocalDateTime createTime;

    @TableField("create_by")
    private String createBy;

    @TableField("update_time")
    private LocalDateTime updateTime;

    @TableField("update_by")
    private String updateBy;

    /**
     * 是否删除(0未删除1已删除)
     */
    @TableField("delete_flag")
    private String deleteFlag;


}
